package com.sanxiau.dormitory.yang.controller;

import com.sanxiau.dormitory.yang.entity.Dorm;
import com.sanxiau.dormitory.yang.entity.Student;
import com.sanxiau.dormitory.yang.face.Base64Util;
import com.sanxiau.dormitory.yang.mapper.AttendanceMapper;
import com.sanxiau.dormitory.yang.service.AttendanceService;
import com.sanxiau.dormitory.yang.service.StudentMessageService;
import com.sanxiau.dormitory.yang.vo.ResultInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpSession;
import java.util.List;

@Controller
@RequestMapping("/test")
public class TestController {

    @Autowired
    StudentMessageService studentMessageService;
    @Autowired
    AttendanceService attendanceService;
    @RequestMapping("/test")
    public String  showMessage(Model model,HttpSession session){
        List<Dorm> hous = attendanceService.queryAllHous();
        model.addAttribute("hous",hous);
        //System.out.println("hous:"+hous);
        return "yang/test";
    }

}
